package cn.pangza.user.utils;

import cn.pangza.user.entity.po.SystemUserPo;
import cn.pangza.user.entity.vo.SystemUserVo;
import org.springframework.security.core.context.SecurityContextHolder;

public class SecurityUtil {
    public static SystemUserPo getCurrentSystemUserPo() {
        return (SystemUserPo) SecurityContextHolder.getContext().getAuthentication().getDetails();
    }

    public static Object getCurrentUser() {
        return SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
